#include <cstdio>
#include <cstring>

int main()
{
	freopen("palind.in", "r", stdin);
	freopen("palind.out", "w", stdout);
	char d[200] = {0};
	int n = 0;
	scanf("%d", &n);
	for ( int i = 0; i < n; i++ )
	{
		scanf("%s", d);
		int flag = 1;
		int len = strlen(d);
		for (int j = 0; j < len/2; j++ ) {
			if ( d[j] != d[len-j-1] ) {
				flag = 0;
				break;
			}
		}
		if ( flag == 1 ) {
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	fclose(stdin);
	fclose(stdout); 
	return 0;
} 
